package com.sunni.service.impl;

import com.sunni.service.DemoService;
import org.springframework.stereotype.Component;

@Component("demoService")
public class DemoServiceImpl implements DemoService {

    @Override
    public Integer testClassCastException() {
        System.out.println("testClassCastException running... 抛出类型转化异常...");
        Object str = "asdasda";
        return (Integer)str;
    }

    @Override
    public Integer testChuFaException() {
        System.out.println("testChuFaException running...抛出不能除0转化异常...");
        return 1/0;
    }

}
